﻿<UserControl
    x:Class="Spritehand.PhysicsHelper.Demos.UWP.ucSmiley"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Spritehand.PhysicsHelper.Demos.UWP"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ph="using:Spritehand.FarseerHelper"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <Canvas x:Name="LayoutRoot" Background="#FF0C0C0C">

        <ph:PhysicsSprite x:Name="smiley" Width="40" Height="40" RestitutionCoefficient="0.6"  ShapeType="Ellipse">



            <ph:PhysicsSprite.Resources>
                <Storyboard x:Name="timelineMoveEyes" RepeatBehavior="Forever">
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="-4"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:03" Value="-1.75"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:04.2000000" Value="-1.75"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:05.4000000" Value="-0.25"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="-4"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:03" Value="-1.75"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:04.2000000" Value="-1.75"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:05.4000000" Value="-0.25"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                        <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="0"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:03" Value="-2.25"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:04.2000000" Value="0"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                        <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="0"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:03" Value="-2.25"/>
                        <SplineDoubleKeyFrame KeyTime="00:00:04.2000000" Value="0"/>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
            </ph:PhysicsSprite.Resources>

            <Ellipse Fill="Yellow" RenderTransformOrigin="0.5,0.5" x:Name="ellipse2" Width="40" Height="40" Stroke="#FF000000" Canvas.Left="0.25" Canvas.Top="0.375">
                <Ellipse.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="0"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0"/>
                    </TransformGroup>
                </Ellipse.RenderTransform>
            </Ellipse>
            <Ellipse Fill="White" RenderTransformOrigin="0.5,0.5" x:Name="ellipse3" Width="7.6" Height="7.8" Stroke="#FF000000" Canvas.Top="11.775" Canvas.Left="10.45">
                <Ellipse.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="0"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0"/>
                    </TransformGroup>
                </Ellipse.RenderTransform>
            </Ellipse>
            <Ellipse Fill="Black" RenderTransformOrigin="0.5,0.5" x:Name="ellipse" Width="3.4" Height="3.8" Stroke="#FF000000" Canvas.Left="13.65" Canvas.Top="13.975">
                <Ellipse.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="0"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0"/>
                    </TransformGroup>
                </Ellipse.RenderTransform>
            </Ellipse>
            <Ellipse Fill="White" Width="7.6" Height="7.8" Stroke="#FF000000" Canvas.Left="21.85" RenderTransformOrigin="0.5,0.5" x:Name="ellipse4" Canvas.Top="11.975">
                <Ellipse.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="0"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0"/>
                    </TransformGroup>
                </Ellipse.RenderTransform>
            </Ellipse>
            <Ellipse Fill="Black" Width="3.4" Height="3.8" Stroke="#FF000000" Canvas.Left="25.45" RenderTransformOrigin="0.5,0.5" x:Name="ellipse1" Canvas.Top="13.775">
                <Ellipse.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="0"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0"/>
                    </TransformGroup>
                </Ellipse.RenderTransform>
            </Ellipse>
            <Path Fill="White" RenderTransformOrigin="0.5,0.5" x:Name="path" Width="13.6" Height="5.249" Stretch="Fill" Stroke="#FF000000" Canvas.Left="13.45" Canvas.Top="25.827" Data="M67.5,6.5 C67.5,9.8137085 51.501539,30.99899 33,30.99899 14.498461,30.99899 0.5,9.8137085 0.5,6.5 0.5,3.1862915 13.498461,12.000027 32,12.000027 50.501539,12.000027 67.5,3.1862915 67.5,6.5 z">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="0"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>

            <Rectangle Width="10.167" Height="2.333" Stroke="#FF000000" Canvas.Left="8.915" Canvas.Top="9.708" RenderTransformOrigin="0.5,0.5" x:Name="rectangle">
                <Rectangle.Fill>
                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                        <GradientStop Color="#FF000000" Offset="0"/>
                        <GradientStop Color="#FF5B3434" Offset="1"/>
                    </LinearGradientBrush>
                </Rectangle.Fill>
                <Rectangle.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="0"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0"/>
                    </TransformGroup>
                </Rectangle.RenderTransform>
            </Rectangle>
            <Rectangle Width="10.167" Height="2.333" Stroke="#FF000000" Canvas.Left="20.585" Canvas.Top="9.708" RenderTransformOrigin="0.5,0.5" x:Name="rectangle1">
                <Rectangle.Fill>
                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                        <GradientStop Color="#FF000000" Offset="0"/>
                        <GradientStop Color="#FF5B3434" Offset="1"/>
                    </LinearGradientBrush>
                </Rectangle.Fill>
                <Rectangle.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="0"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0"/>
                    </TransformGroup>
                </Rectangle.RenderTransform>
            </Rectangle>

            <Path Opacity="0" RenderTransformOrigin="0.416,0.42" x:Name="txtAsterisk" Width="45.965" Height="40.629" Fill="#FFF5EC73" Stretch="Fill" Canvas.Left="-2.133" Canvas.Top="-2.072" Data="M20.039063,41.377029 L27.316406,49.498123 L23.097656,52.556717 L17.578125,43.169998 C18.773438,43.029373 19.59375,42.431717 20.039063,41.377029 z M14.660156,41.377029 C15.128906,42.431717 15.949219,43.029373 17.121094,43.169998 L11.636719,52.556717 L7.4179688,49.498123 z M29.25,33.642654 L30.832031,38.599686 L20.179688,40.919998 L20.285156,40.392654 C20.285156,39.431717 19.945313,38.646561 19.265625,38.037186 z M5.484375,33.642654 L15.46875,38.037186 C14.789063,38.623123 14.449219,39.408279 14.449219,40.392654 L14.519531,40.919998 L3.8671875,38.599686 z M14.765625,26.927811 L19.96875,26.927811 L18.878906,37.755936 C18.457031,37.498123 17.953125,37.369217 17.367188,37.369217 C16.78125,37.369217 16.277344,37.498123 15.855469,37.755936 z">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="0"/>
                        <RotateTransform Angle="0" CenterX="23" CenterY="20" />
                        <TranslateTransform X="0" Y="0"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>

        </ph:PhysicsSprite>


    </Canvas>
</UserControl>
